#region license
/*
 * Copyright (C) 2007 CchenSoft.com
 * 
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License 2.1 or later, as
 * published by the Free Software Foundation. See the included License.txt
 * or http://www.gnu.org/copyleft/lesser.html for details.
 * 
 * Author: Billy Zhang
 */
#endregion

public interface IValidatable {
    //~ Methods ////////////////////////////////////////////////////////////////

    /**
     * Validate this element, and propagate validation to all contained sub-elements.
     * Should throw an InvalidWorkflowDescriptorException with details in message if the element
     * is invalid. Validity checks should be checks that cannot be encapsulated in the DTD.
     *
     * Validation has to be called explicitly on writting, a writeXML() does not validate implicitly;
     * it *IS* thus possible to write invalid descriptor files.  This could be useful for e.g.
     * a graphical workflow definition editor which would like to write incomplete definitions.
     * Validation *IS* performed on loading a workflow definition.
     */
    void Validate();
}
